﻿<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-access="property" default-lazy="true" namespace="Cms.Domain" assembly="Cms.Domain">
  <class name="Menu" table="cmsMenu">
    <cache usage="read-write" />
    <id name="ID" type="System.Int32" unsaved-value="0">
      <column name="ID" />
      <generator class="identity" />
    </id>
    <property name="Name" type="System.String">
      <column name="Name" not-null="true" />
    </property>
    <property name="Description" type="System.String">
      <column name="Description" length="1000000" not-null="false" />
    </property>
    <property name="ItemIsActiveWhenSubItemIsActive" type="System.Boolean">
      <column name="ItemIsActiveWhenSubItemIsActive" not-null="true" />
    </property>
    <property name="SubMenuBehaviour" type="NHibernate.Type.EnumStringType`1[[Cms.Domain.SubMenuBehaviour, Cms.Domain]], NHibernate">
      <column name="SubMenuBehaviour" length="30" not-null="true" />
    </property>
    <property name="ActiveItemPrefix" type="System.String">
      <column name="ActiveItemPrefix" length="255" not-null="false" />
    </property>
    <property name="ExtraWrapperSpans" type="System.Int32">
      <column name="ExtraWrapperSpans" not-null="false" />
    </property>
    <bag cascade="all-delete-orphan" inverse="true" name="Versions" table="cmsMenuVersion" mutable="true">
      <cache usage="read-write" />
      <key>
        <column name="MenuID" />
      </key>
      <one-to-many class="MenuVersion" />
    </bag>
    <many-to-one class="Site" name="Site">
      <column name="SiteID" not-null="true" />
    </many-to-one>
    <many-to-one class="MenuVersion" name="PublishedVersion">
      <column name="PublishedVersionID" not-null="false" />
    </many-to-one>
    <many-to-one cascade="all" class="SourceCode" name="StyleSheet">
      <column name="SourceCodeID" not-null="true" />
    </many-to-one>
  </class>
</hibernate-mapping>